package com.qf.smsplatform.webmaster.dao;

import com.qf.smsplatform.webmaster.pojo.ClientChannelStrategy;
import com.qf.smsplatform.webmaster.pojo.TClientChannel;
import com.qf.smsplatform.webmaster.pojo.TClientChannelExample;

import java.util.List;
import java.util.Set;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface TClientChannelMapper {
    long countByExample(TClientChannelExample example);

    int deleteByExample(TClientChannelExample example);

    int deleteByPrimaryKey(Long id);

    int insert(TClientChannel record);

    int insertSelective(TClientChannel record);

    List<TClientChannel> selectByExample(TClientChannelExample example);

    TClientChannel selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") TClientChannel record, @Param("example") TClientChannelExample example);

    int updateByExample(@Param("record") TClientChannel record, @Param("example") TClientChannelExample example);

    int updateByPrimaryKeySelective(TClientChannel record);

    int updateByPrimaryKey(TClientChannel record);

    //查询出所有通道信息包括指定要映射的字段（clientID,channelId,spNumber,extendNumber,fee,channelType）
    @Select("SELECT tcc.clientId clientId,tc.id channelId,tc.spNumber spNumber,tcc.extendNumber extendNumber,tcc.price fee,tc.channelType channelType from t_channel tc INNER JOIN t_client_channel tcc where tc.id = tcc.channelId")
    Set<ClientChannelStrategy> findClientChannel();
}